ioemu: serial save/load fix
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 16 May 2008 08:30:10 +0000 (09:30 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 16 May 2008 08:30:10 +0000 (09:30 +0100)
commitd4c079bdc594d1d9ef3c7f9c3707638570d764d8
treeb77f99e7eff6f3ab271c745ec70fce3f75da3667
parentb93de169c393454ac8cba172e85131fb0a6006c0
ioemu: serial save/load fix

This patch fixes several bugs in serial.c
 (1) A typo in serial_save() where qemu_get_8s is called (should be
     qemu_put_8s)
 (2) No support provided in serial_load() for version_id == 1 (should
     unmarshal a 1 byte s->divider and should provide a default value
     for s->fcr)
 (3) Call serial_ioport_write() to initialize s->fcr. It is not
     sufficient to load its value; other hidden values (such as
     s->recv_fifo.itl) must be re-initialized.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
tools/ioemu/hw/serial.c